import { defineAsyncComponent } from 'vue'
import { UseThemeStore } from './theme'



export default {
    install: async function (app) {
        const Theme = UseThemeStore();

        // 注入组件
        app.RegistPluginCompontent('Theme.Button', () => import('./Theme.vue'));

        app.on('AfterPluginload', () => {
            app.run('Theme.Change', Theme.changeTheme(Theme.Ans))
        })

        // 注册 获取皮肤配置方法
        app.RegistPluginEvent('Theme.GetConfig', () => Theme.config);
    }
}